/*-------------------------------------------------------------------------
 *
 * make_funcs.c
 *	  creator functions for primitive nodes. The functions here are for
 *	  the most frequently created nodes.
 *
 *-------------------------------------------------------------------------
 */
#include "primary_include_file.h"
#include "nodes/makefuncs.h"

/* makeA_Expr - makes an A_Expr node */
/* _line_027 */
A_Expr *makeA_Expr(A_Expr_Kind kind, List *name, Node *lexpr, Node *rexpr, int location)
{
  A_Expr *a = makeNode(A_Expr);
  
  a->kind = kind;
  a->name = name;
  a->lexpr = lexpr;
  a->rexpr = rexpr;
  a->location = location;
  return a;
}

/* makeSimpleA_Expr - As above, given a simple (unqualified) operator name */
A_Expr *makeSimpleA_Expr(A_Expr_Kind kind, const char *name, Node *lexpr, Node *rexpr, int location)
{
  A_Expr *a = makeNode(A_Expr);
  a->kind = kind;
  a->name = list_make1(makeString((char *)name));
  a->lexpr = lexpr;
  a->rexpr = rexpr;
  a->location = location;
  return a;
}